<template>
  <div>
    <van-row  gutter="20" class="van-row"  type="flex" >
      <van-col span="12"  v-for="(item, index) in containList" :key="index">
        <van-button
          class="btn"
          size="large"
          :text="item.name"
          type="info"
          @click="back(item.path)"
        ></van-button>
      </van-col>
    </van-row>
  </div>
</template>
<script>
export default {
  props: ["containList"],
  data() {
    return {};
  },
  methods: {
    back(url) {
      if (url === "-1") {
        window.history.go(-1);
      } else {
        this.$router.push({
          path: url,
        });
      }
    },
  },
  mounted() {},
};
</script>
<style lang="less" scoped>
.van-row{
    margin: 20px;
}
.btn{
    margin-bottom: 40px;
}
</style>